1. Field of the Invention
The present invention relates to a data processor, more particularly, it relates to a data processor having an incircuit emulation function such as a trace memory or a breakpoint register which stores PC values of executed instructions so as to enable debugging of a system easily.
2. Description of Related Art
For debugging a data processing system, the operation of hardware relative to software for operating the system must be observed accurately. For this reason, a technique called an incircuit emulation has been used hitherto.
Though the incircuit emulation is the effective technique for the system debug, since this technique is for observing various data processed by the data processor to analyze the operation, supporting circuits for the incircuit emulation should be operable at higher speed as the operating speed of the system becomes faster, thus its realization is becoming difficult.
Also, in the data processor adopting the pipeline processing, in such case when a jump instruction is executed, fetched instructions are not always executed, thus an operation analysis of the data processor is becoming more and more difficult.
In order to solve these problems, a data processor in which the supporting circuits for the incircuit emulation for the data processor are realized in one integrated circuit has been proposed.
In this data processor, by integrating the incircuit emulation circuit for debugging a microprocessor system in the same integrated circuit as the microprocessor, information necessary for the operation analysis of the microprocessor is made available outside the integrated circuit. Its detailed content is disclosed in, for example, Japanese Patent Application Laid-Open No. 61-241841 (1986).
As the data processor becomes faster the higher operating speed of the memory is required, results in increase of cost related to a memory system. In order to solve this problem, conventionally a technique known as a cache memory has been used. The data processor in which this cache memory is realized in the same integrated circuit as the micro-processor is also disclosed in, for example, Japanese Patent Application Laid-Open No. 63-193230 (1988) in detail.
When realizing the circuits for incircuit emulation in the same integrated circuit as the data processor to take out information necessary for the debug from the integrated circuit, a memory capable of storing the information at high speed outside the integrated circuit is necessitated. When operation speed of the external memory is slower than that of the data processor, storing of debug information outputted ed from the integrated circuit to the outside is difficult. In the conventional example disclosed in the Japanese Patent Application Laid-Open No. 61-241841 (1986), an output circuit for incircuit emulation and pins for outputting the debug information from the integrated circuit to the outside are provided.
In the microprocessor in which the data processor is realized on one integrated circuit, it is proposed to incorporate a high-speed buffer memory as a data cache. However, in the case where the buffer memory-which occupies a large area in the integrated circuit is used only as the cache, utilization efficiency of the integrated circuit is low. Depending upon applications, there is the case which is less effective even when the internal cache is used, or the case where the internal cache can not be used. Particularly, in order to output many trace information from the integrated circuit by utilizing the incircuit emulation function, it is desirable that the internal cache be not operated. Therefore, in the case where the internal buffer memory has a single function which can only be used in the cache memory, the capacity of the internal buffer memory, in other words, the area occupied in the integrated circuit may not be utilized effectively.